#define _CRT_SECURE_NO_WARNINGS 1
int maxProfit(int* prices, int pricesSize)
{
    int temp[1001];
    int j = 0;
    int max = 0;
    for (int i = 1; i < pricesSize; i++)
    {
        if (prices[1] >= prices[i])
        {
            i++;
        }
        temp[j++] = prices[i];
    }
    int k = sizeof(temp) / sizeof(temp[0]);
    for (int j = 0; j < k; j++)
    {
        max == max > temp[j] ? max : temp[j];
    }
    printf("%d", max);
    return 0;
}